.class public final Lcom/burstly/jackson/map/deser/impl/PropertyBasedCreator;
.super Ljava/lang/Object;
.source "PropertyBasedCreator.java"


# instance fields
.field protected _defaultValues:[Ljava/lang/Object;

.field protected final _properties:Ljava/util/HashMap;
    .annotation system Ldalvik/annotation/Signature;
        value = {
            "Ljava/util/HashMap",
            "<",
            "Ljava/lang/String;",
            "Lcom/burstly/jackson/map/deser/SettableBeanProperty;",
            ">;"
        }
    .end annotation
.end field

.field protected final _propertiesWithInjectables:[Lcom/burstly/jackson/map/deser/SettableBeanProperty;

.field protected final _propertyCount:I

.field protected final _valueInstantiator:Lcom/burstly/jackson/map/deser/ValueInstantiator;


# direct methods
.method public constructor <init>(Lcom/burstly/jackson/map/deser/ValueInstantiator;)V
    .locals 9
    .parameter "valueInstantiator"

    .prologue
    const/4 v7, 0x0

    .line 53
    invoke-direct {p0}, Ljava/lang/Object;-><init>()V

    .line 55
    iput-object p1, p0, Lcom/burstly/jackson/map/deser/impl/PropertyBasedCreator;->_valueInstantiator:Lcom/burstly/jackson/map/deser/ValueInstantiator;

    .line 56
    new-instance v8, Ljava/util/HashMap;

    invoke-direct {v8}, Ljava/util/HashMap;-><init>()V

    iput-object v8, p0, Lcom/burstly/jackson/map/deser/impl/PropertyBasedCreator;->_properties:Ljava/util/HashMap;

    move-object v1, v7

    .line 58
    check-cast v1, [Ljava/lang/Object;

    .line 59
    .local v1, defValues:[Ljava/lang/Object;
    invoke-virtual {p1}, Lcom/burstly/jackson/map/deser/ValueInstantiator;->getFromObjectArguments()[Lcom/burstly/jackson/map/deser/SettableBeanProperty;

    move-result-object v0

    .local v0, creatorProps:[Lcom/burstly/jackson/map/deser/SettableBeanProperty;
    move-object v6, v7

    .line 60
    check-cast v6, [Lcom/burstly/jackson/map/deser/SettableBeanProperty;

    .line 61
    .local v6, propertiesWithInjectables:[Lcom/burstly/jackson/map/deser/SettableBeanProperty;
    array-length v4, v0

    .line 62
    .local v4, len:I
    iput v4, p0, Lcom/burstly/jackson/map/deser/impl/PropertyBasedCreator;->_propertyCount:I

    .line 63
    const/4 v2, 0x0

    .local v2, i:I
    :goto_0
    if-lt v2, v4, :cond_0

    .line 80
    iput-object v1, p0, Lcom/burstly/jackson/map/deser/impl/PropertyBasedCreator;->_defaultValues:[Ljava/lang/Object;

    .line 81
    iput-object v6, p0, Lcom/burstly/jackson/map/deser/impl/PropertyBasedCreator;->_propertiesWithInjectables:[Lcom/burstly/jackson/map/deser/SettableBeanProperty;

    .line 82
    return-void

    .line 64
    :cond_0
    aget-object v5, v0, v2

    .line 65
    .local v5, prop:Lcom/burstly/jackson/map/deser/SettableBeanProperty;
    iget-object v7, p0, Lcom/burstly/jackson/map/deser/impl/PropertyBasedCreator;->_properties:Ljava/util/HashMap;

    invoke-virtual {v5}, Lcom/burstly/jackson/map/deser/SettableBeanProperty;->getName()Ljava/lang/String;

    move-result-object v8

    invoke-virtual {v7, v8, v5}, Ljava/util/HashMap;->put(Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;

    .line 66
    invoke-virtual {v5}, Lcom/burstly/jackson/map/deser/SettableBeanProperty;->getType()Lcom/burstly/jackson/type/JavaType;

    move-result-object v7

    invoke-virtual {v7}, Lcom/burstly/jackson/type/JavaType;->isPrimitive()Z

    move-result v7

    if-eqz v7, :cond_2

    .line 67
    if-nez v1, :cond_1

    .line 68
    new-array v1, v4, [Ljava/lang/Object;

    .line 70
    :cond_1
    invoke-virtual {v5}, Lcom/burstly/jackson/map/deser/SettableBeanProperty;->getType()Lcom/burstly/jackson/type/JavaType;

    move-result-object v7

    invoke-virtual {v7}, Lcom/burstly/jackson/type/JavaType;->getRawClass()Ljava/lang/Class;

    move-result-object v7

    invoke-static {v7}, Lcom/burstly/jackson/map/util/ClassUtil;->defaultValue(Ljava/lang/Class;)Ljava/lang/Object;

    move-result-object v7

    aput-object v7, v1, v2

    .line 72
    :cond_2
    invoke-virtual {v5}, Lcom/burstly/jackson/map/deser/SettableBeanProperty;->getInjectableValueId()Ljava/lang/Object;

    move-result-object v3

    .line 73
    .local v3, injectableValueId:Ljava/lang/Object;
    if-eqz v3, :cond_4

    .line 74
    if-nez v6, :cond_3

    .line 75
    new-array v6, v4, [Lcom/burstly/jackson/map/deser/SettableBeanProperty;

    .line 77
    :cond_3
    aput-object v5, v6, v2

    .line 63
    :cond_4
    add-int/lit8 v2, v2, 0x1

    goto :goto_0
.end method


# virtual methods
.method public assignDeserializer(Lcom/burstly/jackson/map/deser/SettableBeanProperty;Lcom/burstly/jackson/map/JsonDeserializer;)V
    .locals 3
    .parameter "prop"
    .parameter
    .annotation system Ldalvik/annotation/Signature;
        value = {
            "(",
            "Lcom/burstly/jackson/map/deser/SettableBeanProperty;",
            "Lcom/burstly/jackson/map/JsonDeserializer",
            "<",
            "Ljava/lang/Object;",
            ">;)V"
        }
    .end annotation

    .prologue
    .line 93
    .local p2, deser:Lcom/burstly/jackson/map/JsonDeserializer;,"Lcom/burstly/jackson/map/JsonDeserializer<Ljava/lang/Object;>;"
    invoke-virtual {p1, p2}, Lcom/burstly/jackson/map/deser/SettableBeanProperty;->withValueDeserializer(Lcom/burstly/jackson/map/JsonDeserializer;)Lcom/burstly/jackson/map/deser/SettableBeanProperty;

    move-result-object p1

    .line 94
    iget-object v1, p0, Lcom/burstly/jackson/map/deser/impl/PropertyBasedCreator;->_properties:Ljava/util/HashMap;

    invoke-virtual {p1}, Lcom/burstly/jackson/map/deser/SettableBeanProperty;->getName()Ljava/lang/String;

    move-result-object v2

    invoke-virtual {v1, v2, p1}, Ljava/util/HashMap;->put(Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;

    .line 95
    invoke-virtual {p2}, Lcom/burstly/jackson/map/JsonDeserializer;->getNullValue()Ljava/lang/Object;

    move-result-object v0

    .line 96
    .local v0, nullValue:Ljava/lang/Object;
    if-eqz v0, :cond_1

    .line 97
    iget-object v1, p0, Lcom/burstly/jackson/map/deser/impl/PropertyBasedCreator;->_defaultValues:[Ljava/lang/Object;

    if-nez v1, :cond_0

    .line 98
    iget-object v1, p0, Lcom/burstly/jackson/map/deser/impl/PropertyBasedCreator;->_properties:Ljava/util/HashMap;

    invoke-virtual {v1}, Ljava/util/HashMap;->size()I

    move-result v1

    new-array v1, v1, [Ljava/lang/Object;

    iput-object v1, p0, Lcom/burstly/jackson/map/deser/impl/PropertyBasedCreator;->_defaultValues:[Ljava/lang/Object;

    .line 100
    :cond_0
    iget-object v1, p0, Lcom/burstly/jackson/map/deser/impl/PropertyBasedCreator;->_defaultValues:[Ljava/lang/Object;

    invoke-virtual {p1}, Lcom/burstly/jackson/map/deser/SettableBeanProperty;->getPropertyIndex()I

    move-result v2

    aput-object v0, v1, v2

    .line 102
    :cond_1
    return-void
.end method

.method public build(Lcom/burstly/jackson/map/deser/impl/PropertyValueBuffer;)Ljava/lang/Object;
    .locals 4
    .parameter "buffer"
    .annotation system Ldalvik/annotation/Throws;
        value = {
            Ljava/io/IOException;
        }
    .end annotation

    .prologue
    .line 118
    iget-object v2, p0, Lcom/burstly/jackson/map/deser/impl/PropertyBasedCreator;->_valueInstantiator:Lcom/burstly/jackson/map/deser/ValueInstantiator;

    iget-object v3, p0, Lcom/burstly/jackson/map/deser/impl/PropertyBasedCreator;->_defaultValues:[Ljava/lang/Object;

    invoke-virtual {p1, v3}, Lcom/burstly/jackson/map/deser/impl/PropertyValueBuffer;->getParameters([Ljava/lang/Object;)[Ljava/lang/Object;

    move-result-object v3

    invoke-virtual {v2, v3}, Lcom/burstly/jackson/map/deser/ValueInstantiator;->createFromObjectWith([Ljava/lang/Object;)Ljava/lang/Object;

    move-result-object v0

    .line 120
    .local v0, bean:Ljava/lang/Object;
    invoke-virtual {p1}, Lcom/burstly/jackson/map/deser/impl/PropertyValueBuffer;->buffered()Lcom/burstly/jackson/map/deser/impl/PropertyValue;

    move-result-object v1

    .local v1, pv:Lcom/burstly/jackson/map/deser/impl/PropertyValue;
    :goto_0
    if-nez v1, :cond_0

    .line 123
    return-object v0

    .line 121
    :cond_0
    invoke-virtual {v1, v0}, Lcom/burstly/jackson/map/deser/impl/PropertyValue;->assign(Ljava/lang/Object;)V

    .line 120
    iget-object v1, v1, Lcom/burstly/jackson/map/deser/impl/PropertyValue;->next:Lcom/burstly/jackson/map/deser/impl/PropertyValue;

    goto :goto_0
.end method

.method public findCreatorProperty(Ljava/lang/String;)Lcom/burstly/jackson/map/deser/SettableBeanProperty;
    .locals 1
    .parameter "name"

    .prologue
    .line 89
    iget-object v0, p0, Lcom/burstly/jackson/map/deser/impl/PropertyBasedCreator;->_properties:Ljava/util/HashMap;

    invoke-virtual {v0, p1}, Ljava/util/HashMap;->get(Ljava/lang/Object;)Ljava/lang/Object;

    move-result-object v0

    check-cast v0, Lcom/burstly/jackson/map/deser/SettableBeanProperty;

    return-object v0
.end method

.method public getCreatorProperties()Ljava/util/Collection;
    .locals 1
    .annotation system Ldalvik/annotation/Signature;
        value = {
            "()",
            "Ljava/util/Collection",
            "<",
            "Lcom/burstly/jackson/map/deser/SettableBeanProperty;",
            ">;"
        }
    .end annotation

    .prologue
    .line 85
    iget-object v0, p0, Lcom/burstly/jackson/map/deser/impl/PropertyBasedCreator;->_properties:Ljava/util/HashMap;

    invoke-virtual {v0}, Ljava/util/HashMap;->values()Ljava/util/Collection;

    move-result-object v0

    return-object v0
.end method

.method public startBuilding(Lcom/burstly/jackson/JsonParser;Lcom/burstly/jackson/map/DeserializationContext;)Lcom/burstly/jackson/map/deser/impl/PropertyValueBuffer;
    .locals 2
    .parameter "jp"
    .parameter "ctxt"

    .prologue
    .line 109
    new-instance v0, Lcom/burstly/jackson/map/deser/impl/PropertyValueBuffer;

    iget v1, p0, Lcom/burstly/jackson/map/deser/impl/PropertyBasedCreator;->_propertyCount:I

    invoke-direct {v0, p1, p2, v1}, Lcom/burstly/jackson/map/deser/impl/PropertyValueBuffer;-><init>(Lcom/burstly/jackson/JsonParser;Lcom/burstly/jackson/map/DeserializationContext;I)V

    .line 110
    .local v0, buffer:Lcom/burstly/jackson/map/deser/impl/PropertyValueBuffer;
    iget-object v1, p0, Lcom/burstly/jackson/map/deser/impl/PropertyBasedCreator;->_propertiesWithInjectables:[Lcom/burstly/jackson/map/deser/SettableBeanProperty;

    if-eqz v1, :cond_0

    .line 111
    iget-object v1, p0, Lcom/burstly/jackson/map/deser/impl/PropertyBasedCreator;->_propertiesWithInjectables:[Lcom/burstly/jackson/map/deser/SettableBeanProperty;

    invoke-virtual {v0, v1}, Lcom/burstly/jackson/map/deser/impl/PropertyValueBuffer;->inject([Lcom/burstly/jackson/map/deser/SettableBeanProperty;)V

    .line 113
    :cond_0
    return-object v0
.end method
